﻿using MaterialSkin.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TomatoClock.Models;
using TomatoClock.Services;
using TomatoClock.ViewModels;

namespace TomatoClock.Views
{
    public partial class UserPageControl : UserControl
    {
        private User user;
        public UserPageControl()
        {
            InitializeComponent();
            this.Dock = DockStyle.Fill;
        }

        public void SetUser(User user)
        {
            this.user = user;
            label9.Text = user.UserName;
            label6.Text = user.Age.ToString();
            label3.Text = user.Occupation;
            label7.Text = user.Signature;
        }

        public void DisplayGender(User user)
        {
            if (user.Age == 0)
            {
                label2.Text = "男";
            }
            else
            {
                label2.Text = "女";
            }
        }

        private void pictureBox11_Click(object sender, EventArgs e)
        {

        }

        private void UserPageControl_Load(object sender, EventArgs e)
        {

        }

        private void label12_Click(object sender, EventArgs e)
        {

        }

        private void label13_Click(object sender, EventArgs e)
        {

        }
    }
}
